import java.util.Arrays;

//TIP To <b>Run</b> code, press <shortcut actionId="Run"/> or
// click the <icon src="AllIcons.Actions.Execute"/> icon in the gutter.
public class Main {
    public static void main(String[] args) {
        int[] arry = {1, 2, 3, 4, 5, 6, 7};
        if(arry.length % 2 == 0){
            for(int i = 1;i < arry.length/2;i += 2){
                int t = arry[i];
                arry[i] = arry[arry.length - i - 1];
                arry[arry.length - i -1] =t;
            }
        }else if(arry.length % 2 != 0){
            for(int i = 1;i < arry.length/2 + 1;i += 2){
                int t = arry[i];
                arry[i] = arry[arry.length - i];
                arry[arry.length - i] = t;
            }
        }
        System.out.println(Arrays.toString(arry));
    }
}